<?
namespace app\partner\controller;

use think\Controller;
use think\Db;
use think\Session;

class Authorized extends Controller
{
    public $pageSize = 20;

    public function _initialize()
    {

        if (!is_login(Session::get('user'))) {
            $this->error('请先登录', '/index');
        }

        $company=Db::table('company c')->field('c.*, a.username AS kfname,a.qq as kfqq')
            ->join('admin a','c.kf_id = a.id','left')
            ->where('c.id',Session::get('user.id'))
            ->find();
//        dump($company);
        $this->assign('company', $company);



    }
}
